<template>
  <!--  相关方登记-->
  <div class="xgfdj">
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
      <div class="form-small-title" style="margin-top: 25px">
        <el-divider direction="vertical" class="form-divider"></el-divider>
        <span class="form-small-font">基本信息</span>
      </div>
      <el-row style="margin-top: 25px">
        <el-col :span="12">
          <el-form-item label="项目名称：" label-width="100px">
            <el-input v-model="ruleForm.xmmc" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="项目编号：" label-width="100px">
            <el-input v-model="ruleForm.xmbh" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="项目负责人：" label-width="100px">
            <el-input v-model="ruleForm.xmfzr" placeholder="请输入" suffix-icon="el-icon-user" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <div class="form-small-title">
        <el-divider direction="vertical" class="form-divider"></el-divider>
        <span class="form-small-font">相关方信息</span>
      </div>
      <el-row style="margin-top: 25px">
        <el-col :span="6">
          <el-form-item label="名称：" label-width="100px">
            <el-input v-model="ruleForm.mingch" placeholder="请输入" :readonly="status=='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="分类：" label-width="100px">
            <el-select v-model="ruleForm.fenlei" placeholder="请选择" ref="mySelect" :disabled="status==='read'">
              <el-option v-for="item in classifyOptions" :key="item.value" :label="item.label"
                         :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="项目角色：" label-width="100px">
            <el-select v-model="ruleForm.xmjs" placeholder="请选择" ref="mySelect" :disabled="status==='read'">
              <el-option v-for="item in projectRoleOptions" :key="item.value" :label="item.label"
                         :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="管理中：" label-width="100px">
            <el-select v-model="ruleForm.glz" placeholder="请选择" ref="mySelect" :disabled="status==='read'">
              <el-option v-for="item in managementOptions" :key="item.value" :label="item.label"
                         :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="企业名称：" label-width="100px">
            <el-input v-model="ruleForm.qymc" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="部门：" label-width="100px">
            <el-input v-model="ruleForm.bumen" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="职务：" label-width="100px">
            <el-input v-model="ruleForm.zhiwu" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="6">
          <el-form-item label="联系电话：" label-width="100px">
            <el-input v-model="ruleForm.lxdh" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="权利影响：" label-width="100px">
            <el-select v-model="ruleForm.qlyx" placeholder="请选择" ref="mySelect" :disabled="status==='read'">
              <el-option v-for="item in affectOptions" :key="item.value" :label="item.label"
                         :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="关心程度：" label-width="100px">
            <el-select v-model="ruleForm.gxcd" placeholder="请选择" ref="mySelect">
              <el-option v-for="item in concernLevelOptions" :key="item.value" :label="item.label"
                         :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="管理策略：" label-width="100px">
            <el-input v-model="ruleForm.glcl" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="6">
          <el-form-item label="评估参与度：" label-width="100px">
            <el-select v-model="ruleForm.pgcyd" placeholder="请选择" ref="mySelect" :disabled="status==='read'">
              <el-option v-for="item in assessOptions" :key="item.value" :label="item.label"
                         :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="当前参与度：" label-width="100px">
            <el-select v-model="ruleForm.dqcyd" placeholder="请选择" ref="mySelect" :disabled="status==='read'">
              <el-option v-for="item in presentOptions" :key="item.value" :label="item.label"
                         :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="登记人：" label-width="100px">
            <el-input v-model="ruleForm.djr" placeholder="请输入" suffix-icon="el-icon-user" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="跟进人：" label-width="100px">
            <el-input v-model="ruleForm.gjr" placeholder="请输入" suffix-icon="el-icon-user" :readonly="status==='read'" ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="期望：" label-width="100px">
            <el-input v-model="ruleForm.qiwang" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <div class="form-small-title" v-if="status!=='add'">
        <el-divider direction="vertical" class="form-divider"></el-divider>
        <span class="form-small-font">跟进信息</span>
      </div>
      <el-row style="margin-top: 25px" v-if="status!=='add'">
        <el-col :span="6">
          <el-form-item label="跟进人：" label-width="100px">
            <el-input v-model="ruleForm.ren" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="跟进日期：" label-width="100px">
            <el-input v-model="ruleForm.riqi" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="跟进说明：" label-width="100px">
            <el-input v-model="ruleForm.shuoming" placeholder="请输入" :readonly="status==='read'"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "xgfdj",
  data(){
    return{
      ruleForm:{},
      rules:{},
      classifyOptions:[],
      projectRoleOptions:[],
      managementOptions:[],
      affectOptions:[],
      concernLevelOptions:[],
      assessOptions:[],
      presentOptions:[]
    }
  },
  props:{
    status:{
      type: String,
      default: ''
    },
    selectRow:{
      type: Object,
      default: ()=>{}
    }
  },
  watch:{
    selectRow:{
      handler(val) {
        if(this.selectRow){
          this.ruleForm.xmmc = this.selectRow.projectName
          this.ruleForm.mingch = this.selectRow.name
          this.ruleForm.zhiwu = this.selectRow.duty
          this.ruleForm.qlyx = this.selectRow.impact
          this.ruleForm.gxcd = this.selectRow.concernLevel
          this.ruleForm.glcl = this.selectRow.strategy
          this.ruleForm.pgcyd = this.selectRow.assess
          this.ruleForm.dqcyd = this.selectRow.present
        }
      },
      immediate: true,
    }
  },
  methods:{
  }
}
</script>

<style scoped lang="scss">
.xgfdj ::v-deep{
  .el-input__inner {
    border: 0 !important;
    border-bottom: 1px solid #DCDFE6 !important;
    border-radius: 0 !important;
    padding-right: 20px !important;
  }
}
.form-small-title{
  border-bottom: solid 2px #C0C4CC;
  padding-bottom: 10px;
}
.form-divider{
  width: 5px;
  height: 26px;
  background: rgb(66, 185, 131);
}
.form-small-font{
  font-size: 19px;
  font-weight: 600;
  color: #303133;
}
</style>
